import React, { Component } from 'react'
import MovieShow from './MovieShow'

export default class App extends Component {
  state={
    movieType:1
  }
  render() {
    return (
      <div>
        <div>
          <button onClick={()=>this.setState({movieType:1})}>正在热映</button>
          <button onClick={()=>this.setState({movieType:2})}>即将上映</button>
        </div>
        <div>
            <MovieShow type={this.state.movieType}></MovieShow>
        </div>
      </div>
    )
  }
}
